
package com.feib.soeasy.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * @title (#)PaymentConfigItem.java<br>
 * @description <br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2011/4/2 create by Jimmy Liu<br>
 */
@Entity
@Table(name = "PAYMENT_CONFIG_ITEM")
public class PaymentConfigItem  extends AuditEntity {

    private static final long serialVersionUID = -5620949247710162063L;
    
    /**
     * PK in Table
     */
    private Long paymentConfigItemPk;
    
    /**
     * 
     */
    private PaymentConfig paymentConfig;
    
    /**
     * 繳費項目
     */
    private String itemName;
    

    
    /**
     * 收費型式</br>
     * 1:依坪數</br>
     * 2:依車位數</br>
     * 3:固定金額</br>
     */
    private Integer configType;
    
    /**
     * 收費金額
     */
    private Long amount;
    
    
    
    
    /**
     * @return the paymentConfigItemPk
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="PAYMENT_CONFIG_ITEM_PK", nullable=false)
    public Long getPaymentConfigItemPk() {
        return paymentConfigItemPk;
    }


    
    /**
     * @param paymentConfigItemPk the paymentConfigItemPk to set
     */
    public void setPaymentConfigItemPk(Long paymentConfigItemPk) {
        this.paymentConfigItemPk = paymentConfigItemPk;
    }


    
    /**
     * @return the paymentConfig
     */
    @ManyToOne
    @JoinColumn(name="PAYMENT_CONFIG_PK", nullable=false)
    public PaymentConfig getPaymentConfig() {
        return paymentConfig;
    }


    
    /**
     * @param paymentConfig the paymentConfig to set
     */
    public void setPaymentConfig(PaymentConfig paymentConfig) {
        this.paymentConfig = paymentConfig;
    }


    
    /**
     * @return the itemName
     */
    @Column(name="ITEM_NAME", nullable=false, length=255)
    public String getItemName() {
        return itemName;
    }


    
    /**
     * @param itemName the itemName to set
     */
    public void setItemName(String itemName) {
        this.itemName = itemName;
    }


    /**
     * @return the configType
     */
    @Column(name="CONFIG_TYPE", nullable=false)
    public Integer getConfigType() {
        return configType;
    }

    
    /**
     * @param configType the configType to set
     */
    public void setConfigType(Integer configType) {
        this.configType = configType;
    }

    
    /**
     * @return the amount
     */
    @Column(name="AMOUNT", nullable=false)
    public Long getAmount() {
        return amount;
    }

    
    /**
     * @param amount the amount to set
     */
    public void setAmount(Long amount) {
        this.amount = amount;
    }

}
